<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>SmartList</title>
		<link rel="stylesheet" type="text/css" href="resources/style/style.css" />
		<link rel="shortcut icon" href="resources/images/favicon.ico" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
		<script type="text/javascript" src="resources/javascript/ajax.js"></script>
	</head>

	<body>
		<div id="box">

		<div id="send">
			<form action="" id="sendTaskForm">
				<input type="text" name="text" id="task" placeholder="Enter tasks"><br>
				<input type="submit" id="submit" value="Save">
			</form>
		</div>

		<div id="tasks">
			<h2>Tasks:</h2>
			
				<div id="taskBox">
					<c:forEach var="task" items="${tasks}">
						<input type="checkbox" value="${task.status}" />
						<c:out value="${task.task}" />
						<br>
					</c:forEach>
				</div>
			
			<h2>Context:</h2>
			
			<div id="contextBox">
				<c:forEach var="context" items="${contexts}">
					<c:out value="${context}" />
					<br>
				</c:forEach>
			</div>
		</div>

<div id="contextBox">${username} <a href="<c:url value='/logout' />" >logout</a></div>
	
<jsp:include page="/WEB-INF/layouts/footer.jsp" />

